package com.heartline.util;

import java.util.Iterator;
import java.util.List;

/**
 * String 工具类
 * Created by zhy on 2018/6/22.
 */
public class StringUtils extends com.soecode.wxtools.util.StringUtils {

    private StringUtils() {
    }

    public static String listToString(List<String> list) {
        if (list == null) return "";
        Iterator<String> it = list.iterator();
        if (!it.hasNext())
            return "";

        StringBuilder sb = new StringBuilder();
        for (; ; ) {
            String e = it.next();
            sb.append(e);
            if (!it.hasNext())
                return sb.toString();
            sb.append(',').append(' ');
        }
    }
}
